package com.ljfiction.book.MyView;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by CYS on 2017/6/25 0025.
 * 数据库创建
 */
public class SqliteHelper extends SQLiteOpenHelper {

    private static final String DB_NAME = "history.db";//数据库名称
    private static final int DB_VERSION = 1;
    public static final String CRATE_TABLE = "create table history ("
            + "history_id integer primary key autoincrement, "
            + "history_name text)";

    public SqliteHelper(Context context) {
        super(context, DB_NAME, null, DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(CRATE_TABLE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
